<?php
define('USERNAME_REQUIRED', TRUE);
define('ACCOUNT_REQUIRED', TRUE);
include('global.php');
define("THIS_SCRIPT", 'community');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><?php echo $sitename." - ".$lang['community']; ?></title>

    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
    
    <script type="text/javascript" src="Public/JS/jquery.history.js"></script>
    
    <link type="text/css" rel="stylesheet" href="Public/Styles/<?php echo $currentstyle ?>/CSS/main.css" />
    
</head> 

<body> 

<?php include("system/header_com.php"); ?>

<div class="mainBox"> 

	<?php include("system/communitynav.php"); ?>

	<div class="mid" id="midcontent"> 
    
    	<?php include("system/grand_news_widget.php"); ?>

		<div class="column" id="column1">

			<div class="l_boxHeader_lightblue">

				<div class="titel">

					Community

				</div>

			</div>

			<div class="contentBox">

				<div class="boxContent">  

					Hallo! Hier zijn wat statistieken te vinden van zengo!

					<br />

					Op dit moment hebben wij :

					<br />

					<br />
 
					<div style="background-color: #F4F4F4; border: 1px solid #F4F4F4; border-radius: 5px; padding: 10px 10px 10px 10px; width: auto;">

						<?php
						$users = mysql_query("SELECT * FROM users ");
						$teller = mysql_num_rows($users);
						?>

						<b><?php echo $teller; ?></b> geregistreerde gebruikers.

						<br />

    				</div>

					<div style="background-color: #F4F4F4; border: 1px solid #F4F4F4; border-radius: 5px; padding: 10px 10px 10px 10px; width: auto; margin-top: 6px;">

						<?php
						$news = mysql_query("SELECT * FROM cms_news ");
						$teller = mysql_num_rows($news);
						?>

						<b><?php echo $teller; ?></b> gemaakte nieuwsberichten.

						<br />

					</div>

					<div style="background-color: #F4F4F4; border: 1px solid #F4F4F4; border-radius: 5px; padding: 10px 10px 10px 10px; width: auto; margin-top: 6px;">

						<?php 
						$rooms = mysql_query("SELECT * FROM rooms ");
						$teller = mysql_num_rows($rooms);
						?>

						<b><?php echo $teller; ?></b> gemaakte kamers.

						<br>

					</div>

					<div style="background-color: #F4F4F4; border: 1px solid #F4F4F4; border-radius: 5px; padding: 10px 10px 10px 10px; width: auto; margin-top: 6px;">

						<?php
						$furniture = mysql_query("SELECT * FROM furniture ");
						$teller = mysql_num_rows($furniture);
						?>

						Er zijn <b><?php echo $teller; ?></b> meubels.

						<br>

					</div>

					<div style="background-color: #F4F4F4; border: 1px solid #F4F4F4; border-radius: 5px; padding: 10px 10px 10px 10px; width: auto; margin-top: 6px;">

						<?php
						$catalog_items = mysql_query("SELECT * FROM catalog_items ");
						$teller = mysql_num_rows($catalog_items);
						?>

						Er zijn <b><?php echo $teller; ?></b> meubels in de catalogus verkrijgbaar.

						<br>

					</div>

					<div style="background-color: #F4F4F4; border: 1px solid #F4F4F4; border-radius: 5px; padding: 10px 10px 10px 10px; width: auto; margin-top: 6px;">

						<?php
						$bots = mysql_query("SELECT * FROM bots ");
						$teller = mysql_num_rows($bots);
						?>

						Er zijn <b><?php echo $teller; ?></b> bots gemaakt.

						<br>

					</div>

					<div style="background-color: #F4F4F4; border: 1px solid #F4F4F4; border-radius: 5px; padding: 10px 10px 10px 10px; width: auto; margin-top: 6px;">

						<?php
						$bans = mysql_query("SELECT * FROM bans ");
						$teller = mysql_num_rows($bans);
						?>

						Er zijn <b><?php echo $teller; ?></b> verbanningen geplaatst.

						<br />

					</div>

					<div style="background-color: #F4F4F4; border: 1px solid #F4F4F4; border-radius: 5px; padding: 10px 10px 10px 10px; width: auto; margin-top: 6px;">

						<?php
						$items = mysql_query("SELECT * FROM items ");
						$teller = mysql_num_rows($items);
						?>

						Alle zengo's bezitten samen <b><?php echo $teller; ?></b> meubels.

						<br>

					</div>

					<div style="background-color: #F4F4F4; border: 1px solid #F4F4F4; border-radius: 5px; padding: 10px 10px 10px 10px; width: auto; margin-top: 6px;">

						<?php
						$stream = mysql_query("SELECT * FROM stream ");
						$teller = mysql_num_rows($stream);
						?>

						Er zijn <b><?php echo $teller; ?></b> stream berichten gemaakt.

						<br>

					</div>

					<div style="background-color: #F4F4F4; border: 1px solid #F4F4F4; border-radius: 5px; padding: 10px 10px 10px 10px; width: auto; margin-top: 6px;">

						<?php
						$gastenboek = mysql_query("SELECT * FROM gastenboek ");
						$teller = mysql_num_rows($gastenboek);
						?>

						Er zijn <b><?php echo $teller; ?></b> gastenboek berichten gemaakt.

						<br>

					</div>

				</div>

			</div>

			<div class="l_boxBottom"></div>

			<?php
			$query_users = mysql_query("SELECT id FROM users");
			if(mysql_num_rows($query_users) < 6){
	
			}else{ 
			?>

            <div style="margin-top: 10px;" class="l_boxHeader_lightblue">

				<div class="titel">

					Random <?php echo $lang['users']; ?>

				</div>

			</div>

			<div class="contentBox">

				<div class="boxContent"> 
        
					<div class="window spotlight orange" style="background-position: -300px -345px;">

					<div id="spot_text">

						<table width="50%">

							<div style="margin-left: 30px;">

								<?php $getrandom = mysql_query("SELECT * FROM users ORDER BY RAND() LIMIT 6;"); while($random = mysql_fetch_array($getrandom)) { ?>

									<a style="" href="../home.php?u=<?php echo $random['username']; ?>">

										<img style="margin-top: -15px;" align="left" src="http://www.habbo.com/habbo-imaging/avatarimage?figure=<?php echo $random['look']; ?>&direction=4" onmouseover="tooltip.show('<b><?php echo $random['username']; ?></b>');" onmouseout="tooltip.hide();"/>

									</a> 

								<?php } ?>

							</div>

							<?php $getrandom = mysql_query("SELECT * FROM users ORDER BY RAND() LIMIT 6;"); while($random = mysql_fetch_array($getrandom)) { ?>

								<a style="" href="../home.php?u=<?php echo $random['username']; ?>">

									<img style="margin-top: -60px;" align="left" src="http://www.habbo.com/habbo-imaging/avatarimage?figure=<?php echo $random['look']; ?>&direction=4" onmouseover="tooltip.show('<b><?php echo $random['username']; ?></b>');" onmouseout="tooltip.hide();"/>

								</a> 

							<?php } ?>

							<div style="margin-left: 30px;">

								<?php $getrandom = mysql_query("SELECT * FROM users ORDER BY RAND() LIMIT 6;"); while($random = mysql_fetch_array($getrandom)) { ?>

									<a style="" href="../home.php?u=<?php echo $random['username']; ?>">

										<img style="margin-top: -60px;" align="left" src="http://www.habbo.com/habbo-imaging/avatarimage?figure=<?php echo $random['look']; ?>&direction=4" onmouseover="tooltip.show('<b><?php echo $random['username']; ?></b>');" onmouseout="tooltip.hide();"/>

									</a> 

								<?php } ?>

							</div>

						</table>

					</div>

				</div>
            
			</div>

		</div>

		<div class="l_boxBottom"></div>

		<?php } ?>

	</div>

	<div class="column" id="column2" style="text-align:left;">

		<?php include("system/news_widget.php") ?>

	</div>

</div>
		
<?php
$query_display_flow_image = mysql_query("SELECT * FROM cms_news WHERE super_fader = 1");
$row_news_flow_image = mysql_num_rows($query_display_flow_image);
?>
        
<div style=" <?php if ($row_news_flow_image == 0) { }else{ echo'margin-top: -310px;'; } ?> float: right; margin-right: 2px; width: 156px;">
        
	<?php include("system/sideads.php"); ?>
            
</div>

</div> 

<?php include("system/footer.php"); ?>

</div> 

</body> 
</html>